<?php if (!defined('THINK_PATH')) exit(); /*a:5:{s:114:"D:\phpstudy_pro\WWW\qdcrmceshi.com\public/../application/admin\view\qingdongams\jigoucustomer\customer\detail.html";i:1753430310;s:77:"D:\phpstudy_pro\WWW\qdcrmceshi.com\application\admin\view\layout\default.html";i:1746006160;s:74:"D:\phpstudy_pro\WWW\qdcrmceshi.com\application\admin\view\common\meta.html";i:1746006160;s:93:"D:\phpstudy_pro\WWW\qdcrmceshi.com\application\admin\view\qingdongams\common\form_detail.html";i:1751938036;s:76:"D:\phpstudy_pro\WWW\qdcrmceshi.com\application\admin\view\common\script.html";i:1746006160;}*/ ?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">
<meta name="referrer" content="never">
<meta name="robots" content="noindex, nofollow">

<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<!-- Loading Bootstrap -->
<link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo htmlentities(\think\Config::get('site.version') ?? ''); ?>" rel="stylesheet">

<?php if(\think\Config::get('fastadmin.adminskin')): ?>
<link href="/assets/css/skins/<?php echo htmlentities(\think\Config::get('fastadmin.adminskin') ?? ''); ?>.css?v=<?php echo htmlentities(\think\Config::get('site.version') ?? ''); ?>" rel="stylesheet">
<?php endif; ?>

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
  <script src="/assets/js/html5shiv.js"></script>
  <script src="/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
    var require = {
        config:  <?php echo json_encode($config ?? ''); ?>
    };
</script>

    </head>

    <body class="inside-header inside-aside <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
        <div id="main" role="main">
            <div class="tab-content tab-addtabs">
                <div id="content">
                    <div class="row">
                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                            <section class="content-header hide">
                                <h1>
                                    <?php echo __('Dashboard'); ?>
                                    <small><?php echo __('Control panel'); ?></small>
                                </h1>
                            </section>
                            <?php if(!IS_DIALOG && !\think\Config::get('fastadmin.multiplenav') && \think\Config::get('fastadmin.breadcrumb')): ?>
                            <!-- RIBBON -->
                            <div id="ribbon">
                                <ol class="breadcrumb pull-left">
                                    <?php if($auth->check('dashboard')): ?>
                                    <li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> <?php echo __('Dashboard'); ?></a></li>
                                    <?php endif; ?>
                                </ol>
                                <ol class="breadcrumb pull-right">
                                    <?php foreach($breadcrumb as $vo): ?>
                                    <li><a href="javascript:;" data-url="<?php echo htmlentities($vo['url'] ?? ''); ?>"><?php echo htmlentities($vo['title'] ?? ''); ?></a></li>
                                    <?php endforeach; ?>
                                </ol>
                            </div>
                            <!-- END RIBBON -->
                            <?php endif; ?>
                            <div class="content">
                                <link href="/assets/addons/qingdongams/css/common.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">

<style type="text/css">
	.btn-list {
		position: fixed;
		right: 40px;
	}
	.div-flex {
		display: flex
	}
	.div-flex .form-group {
		margin-right: 50px;
		text-align: center;
		line-height: 25px;
		margin-bottom: 0;
	}
	.tab-pane {
		border: 1px solid #F6F6F6;
	}
	.i-color {
		font-size: 34px;margin-right: 10px;color: #86C3FF;
	}
	.thumbnail {
		display: flow-root;
		width: max-content;
	}
	.thumbnail img {
		width: 50px;
		float: left;
		padding: 5px;
	}

</style>
<div class="panel panel-default panel-intro">
	<input type="hidden" name="ids" id="ids" value="<?php echo $ids; ?>"/>
	<div>
		<div class="div-flex">
			<i class="fa fa-address-card i-color"></i>
			<div style="line-height: 35px"><b><?php echo $row['name']; ?></b>
				<?php if($row['lat']): ?>
				<a href="https://apis.map.qq.com/uri/v1/marker?marker=coord:<?php echo $row['lat']; ?>,<?php echo $row['lng']; ?>;title:<?php echo $row['name']; ?>;addr:<?php echo $row['address_detail']; ?>&referer=crm" target="_blank" ><i class="fa fa-map-marker text-blue" style="font-size: 18px;margin-right:4px"></i><?php echo $row['address_detail']; ?></a> <?php endif; ?></div>
			<?php if($row['operation'] == 'update'): ?>
			<div class="btn-list">
				<?php if(($row['operation_team'] == 'update') or $row['operation'] == 'update'): ?>
				<a class="btn btn-success btn-edit <?php echo $auth->check('qingdongams/customer/customer/edit')?'':'hide'; ?>"  >编辑</a>
				<?php endif; if($row['operation_team'] == 'read'): if($row['owner_staff_id'] != '0'): ?>
				<a class="btn btn-success btn-change">转移</a>
				<a href="javascript:void(0)"
				   class="btn btn-success btn-seas <?php echo $auth->check('qingdongams/customer/customer/seas')?'':'hide'; ?>" >放入公海</a>
				<?php else: ?>

				<a class="btn btn-success btn-change <?php echo $auth->check('qingdongams/customer/customer/change')?'':'hide'; ?>">领取</a>
				<?php endif; ?>
				<a href="javascript:void(0)"
				   class="btn btn-success btn-word" data-id="<?php echo $ids; ?>"
				    data-types="customer" data-title="导出word">导出word</a>
<!--				<a href="javascript:void(0)"-->
<!--				   class="btn btn-success btn-send-email <?php echo $auth->check('qingdongams/general/email/send_email')?'':'hide'; ?>"-->
<!--				   data-url="qingdongams/general/email/send_email" data-types="customer" data-title="发送邮件">发送邮件</a>-->
<!--				<a href="javascript:void(0)"-->
<!--				   class="btn btn-success btn-send-sms <?php echo $auth->check('qingdongams/general/sms/send_sms')?'':'hide'; ?>"-->
<!--				   data-url="qingdongams/general/sms/send_sms" data-types="customer" data-title="发送短信">发送短信</a>-->
<!--				<?php if($row['owner_staff_id'] != '0'): ?>-->
<!--				<a href="javascript:void(0)"-->
<!--				   class="btn btn-danger btn-del <?php echo $auth->check('qingdongams/customer/customer/del')?'':'hide'; ?>" >删除</a>-->
<!--				<?php endif; ?>-->
				<?php endif; ?>
			</div>
			<?php endif; ?>
		</div>


		<div class="div-flex" style="margin-top: 20px;margin-bottom: 20px">
			<div class="form-group">
				<span class="text-muted">客户状态</span>
				<p><?php echo $row['follow']; ?></p>
			</div>

			<div class="form-group">
				<span class="text-muted">创建人</span>
				<p><?php if(isset($row['create_staff']['name'])): ?><?php echo $row['create_staff']['name']; endif; ?></p>
			</div>

			<div class="form-group">
				<span class="text-muted">负责人</span>
				<p><?php if(isset($row['owner_staff']['name'])): ?><?php echo $row['owner_staff']['name']; endif; ?></p>
			</div>
			<div class="form-group">
				<span class="text-muted">销售金额</span>
				<p><?php echo $row['c_money']; ?></p>
			</div>
			<div class="form-group">
				<span class="text-muted">回款金额</span>
				<p><?php echo $row['r_money']; ?></p>
			</div>
			<div class="form-group">
				<span class="text-muted">工单收款</span>
				<p><?php echo $row['w_money']; ?></p>
			</div>
			<div class="form-group">
				<span class="text-muted">费用总额</span>
				<p><?php echo $row['s_money']; ?></p>
			</div>
			<div class="form-group">
				<span class="text-muted">创建时间</span>
				<p><?php if(!(empty($row['createtime']) || (($row['createtime'] instanceof \think\Collection || $row['createtime'] instanceof \think\Paginator ) && $row['createtime']->isEmpty()))): ?>
					<?php echo $row['createtime']; endif; ?></p>
			</div>
		</div>
	</div>

	<div>

		<ul class="nav nav-tabs" role="tablist">
			<li role="presentation" class="active"><a href="#record" aria-controls="home" role="tab" data-toggle="tab">跟进记录</a></li>
			<li role="presentation"><a href="#basic" aria-controls="profile" role="tab" data-toggle="tab">基本信息</a></li>
			<li role="presentation"><a href="#contacts" aria-controls="messages" role="tab" data-toggle="tab">联系人</a></li>
			<li role="presentation"><a href="#settings7" aria-controls="settings" role="tab" data-toggle="tab">商机</a></li>
			<li role="presentation"><a href="#quote" aria-controls="messages" role="tab" data-toggle="tab">报价记录</a></li>
			<li role="presentation"><a href="#product" aria-controls="messages" role="tab" data-toggle="tab">客户产品</a></li>
			<li role="presentation"><a href="#settings1" aria-controls="settings" role="tab" data-toggle="tab">合同</a></li>
			<li role="presentation"><a href="#settings5" aria-controls="settings" role="tab" data-toggle="tab">费用</a></li>
			<li role="presentation"><a href="#settings2" aria-controls="settings" role="tab" data-toggle="tab">回款信息</a></li>
			<?php if($row['operation'] == 'update' && $row['operation_team'] == 'read'): ?>
			<li role="presentation"><a href="#team" aria-controls="settings" role="tab"
									   data-toggle="tab">相关团队</a></li>
			<?php endif; ?>
			<li role="presentation"><a href="#workorder" aria-controls="settings" role="tab" data-toggle="tab">工单记录</a></li>
			<li role="presentation"><a href="#settings3" aria-controls="settings" role="tab" data-toggle="tab">附件</a></li>
			<li role="presentation"><a href="#settings6" aria-controls="settings" role="tab" data-toggle="tab">签到记录</a></li>
			<li role="presentation"><a href="#settings4" aria-controls="settings" role="tab" data-toggle="tab">操作记录</a></li>
		</ul>

		<div class="tab-content" style="overflow-y: scroll;min-height:565px">
			<div role="tabpanel" class="tab-pane fade active in panel-body" id="record">

				<div id="toolbar_records" class="toolbar">
					<?php echo build_toolbar('refresh'); if($row['operation'] == 'update'): ?>
					<a class="btn btn-success btn-dialog <?php echo $auth->check('qingdongams/customer/record/add')?'':'hide'; ?>"
					   data-url="qingdongams/customer/record/add?ids=<?php echo $row['id']; ?>" data-title="新建跟进" data-refresh="true" data-area=["90%","90%"]>新建跟进</a>
					<?php endif; ?>
				</div>
				<table id="records" class="table table-striped table-bordered table-hover table-nowrap"
					   width="100%">
				</table>

			</div>
			<div role="tabpanel" class="tab-pane fade panel-body form-horizontal" id="basic">
				<div class="form-group">
					<div class="alert alert-warning-light no-margin">
						客户信息
					</div>
				</div>
				<div class="form-group">
					<?php if(is_array($form_data) || $form_data instanceof \think\Collection || $form_data instanceof \think\Paginator): if( count($form_data)==0 ) : echo "" ;else: foreach($form_data as $key=>$val): if($val['config']['is_delete'] == true || true): if($val['component'] == 'input'): ?>
		<div class="col-xs-6 col-sm-5">
			<div class="form-group col-sm-10">
				<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
				<?php echo $row[$val['id']]??''; ?>
			</div>
		</div>
	<?php endif; if($val['component'] == 'input-number'): ?>
		<div class="col-xs-6 col-sm-5">
			<div class="form-group col-sm-10">
				<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
				<?php echo $row[$val['id']]??''; ?>
			</div>
		</div>
	<?php endif; if($val['component'] == 'textarea'): ?>
	<div class="col-xs-12 col-sm-10">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php echo $row[$val['id']]??''; ?>
		</div>
	</div>
	<?php endif; if($val['component'] == 'radio'): ?>
	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php echo $row[$val['id']]??''; ?>

		</div>
	</div>
	<?php endif; if($val['component'] == 'checkbox'): ?>
	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php echo $row[$val['id']]??''; ?>
		</div>
	</div>
	<?php endif; if($val['component'] == 'Cascader'): ?>
	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php echo $row[$val['id']]??''; ?>
		</div>
	</div>
	<?php endif; if($val['component'] == 'select'): ?>
	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php echo $row[$val['id']]??''; ?>
		</div>
	</div>
	<?php endif; if($val['component'] == 'TimePicker'): ?>
	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php echo $row[$val['id']]??''; ?>
		</div>
	</div>
	<?php endif; if($val['component'] == 'DatePicker'): ?>
	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php echo $row[$val['id']]??''; ?>
		</div>
	</div>
	<?php endif; if($val['component'] == 'Rate'): ?>
	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php echo $row[$val['id']]??''; ?>
		</div>
	</div>
	<?php endif; if($val['component'] == 'uploadImage'): ?>
	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php if(isset($row[$val['id']]) && $row[$val['id']] != ''): if(is_array($row[$val['id']]) || $row[$val['id']] instanceof \think\Collection || $row[$val['id']] instanceof \think\Paginator): if( count($row[$val['id']])==0 ) : echo "" ;else: foreach($row[$val['id']] as $key=>$v): ?>
			<a href="<?php echo $v['file_path']??''; ?>" target="_blank" style="margin-right:10px;">
				<img  src="<?php echo $v['file_path']??''; ?>" data-tips-image width="100px" height="100px" alt="">
			</a>
			<?php endforeach; endif; else: echo "" ;endif; endif; ?>
		</div>
	</div>
	<?php endif; if($val['component'] == 'uploadFile'): ?>
	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php if(isset($row[$val['id']]) && $row[$val['id']] != ''): if(is_array($row[$val['id']]) || $row[$val['id']] instanceof \think\Collection || $row[$val['id']] instanceof \think\Paginator): if( count($row[$val['id']])==0 ) : echo "" ;else: foreach($row[$val['id']] as $key=>$v): ?>
			<a href="<?php echo $v['file_path']??''; ?>" target="_blank" style="margin-right:10px;">
				<?php echo $v['name']; ?>
			</a>
			<?php endforeach; endif; else: echo "" ;endif; endif; ?>
		</div>
	</div>
	<?php endif; ?>

	<!--金额-->
	<?php if($val['component'] == 'input-money'): ?>
	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php echo (isset($row[$val['id']]) && ($row[$val['id']] !== '')?$row[$val['id']]:''); ?>
		</div>
	</div>
	<?php endif; ?>
	<!--	手机号-->
	<?php if($val['component'] == 'input-mobile'): ?>
	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php echo (isset($row[$val['id']]) && ($row[$val['id']] !== '')?$row[$val['id']]:''); ?>
		</div>
	</div>
	<?php endif; ?>
	<!--邮箱-->
	<?php if($val['component'] == 'input-email'): ?>
	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php echo (isset($row[$val['id']]) && ($row[$val['id']] !== '')?$row[$val['id']]:''); ?>
		</div>
	</div>
	<?php endif; ?>
	<!--编辑器-->
	<?php if($val['component'] == 'editor'): ?>
	<div class="col-xs-12 col-sm-10">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php echo (isset($row[$val['id']]) && ($row[$val['id']] !== '')?$row[$val['id']]:''); ?>
		</div>
	</div>
	<?php endif; ?>
	<!--开关-->
	<?php if($val['component'] == 'switch'): ?>
	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<a href="javascript:;" data-toggle="switcher" disabled class="btn-switcher" data-input-id="c-<?php echo $val['id']; ?>" data-yes="1" data-no="0" >
				<?php if(isset($row[$val['id']])): if($row[$val['id']] == '0'): ?>
					<i class='fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x'></i>
					<?php else: ?>
					<i class='fa fa-toggle-on text-success fa-2x'></i>
					<?php endif; else: ?>
					<i class='fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x'></i>
				<?php endif; ?>

			</a>
		</div>
	</div>
	<?php endif; ?>

	<!--地理位置-->
	<?php if($val['component'] == 'location'): ?>

	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php echo (isset($row[$val['id']]) && ($row[$val['id']] !== '')?$row[$val['id']]:''); ?>
			<a href="https://apis.map.qq.com/uri/v1/marker?marker=coord:<?php echo (isset($row[$val['id'].'_lat']) && ($row[$val['id'].'_lat'] !== '')?$row[$val['id'].'_lat']:''); ?>,<?php echo (isset($row[$val['id'].'_lng']) && ($row[$val['id'].'_lng'] !== '')?$row[$val['id'].'_lng']:''); ?>;title:<?php echo (isset($row['name']) && ($row['name'] !== '')?$row['name']:''); ?>;addr:<?php echo (isset($row[$val['id']]) && ($row[$val['id']] !== '')?$row[$val['id']]:''); ?>&referer=crm" target="_blank" ><i class="fa fa-map-marker text-blue" style="font-size: 18px;margin-right:4px"></i></a>
		</div>
	</div>

	<?php endif; ?>
	<!--地图-->
	<?php if($val['component'] == 'map'): ?>

	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php echo (isset($row[$val['id']]) && ($row[$val['id']] !== '')?$row[$val['id']]:''); ?>
			<a href="https://apis.map.qq.com/uri/v1/marker?marker=coord:<?php echo (isset($row[$val['id'].'_lat']) && ($row[$val['id'].'_lat'] !== '')?$row[$val['id'].'_lat']:''); ?>,<?php echo (isset($row[$val['id'].'_lng']) && ($row[$val['id'].'_lng'] !== '')?$row[$val['id'].'_lng']:''); ?>;title:<?php echo (isset($row['name']) && ($row['name'] !== '')?$row['name']:''); ?>;addr:<?php echo (isset($row[$val['id']]) && ($row[$val['id']] !== '')?$row[$val['id']]:''); ?>&referer=crm" target="_blank" ><i class="fa fa-map-marker text-blue" style="font-size: 18px;margin-right:4px"></i></a>
		</div>
	</div>
	<?php endif; ?>
	<!--关联客户-->
	<?php if($val['component'] == 'customer'): ?>

	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php if(isset($row[$val['id']]) && $row[$val['id']]): ?>
			<?php echo (isset($row[$val['id']]['name']) && ($row[$val['id']]['name'] !== '')?$row[$val['id']]['name']:''); endif; ?>
		</div>
	</div>
	<?php endif; ?>
	<!--关联联系人-->
	<?php if($val['component'] == 'contact'): ?>
	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php if(isset($row[$val['id']]) && $row[$val['id']]): ?>
			<?php echo (isset($row[$val['id']]['name']) && ($row[$val['id']]['name'] !== '')?$row[$val['id']]['name']:''); endif; ?>
		</div>
	</div>
	<?php endif; ?>
	<!--关联合同-->
	<?php if($val['component'] == 'contract'): ?>
	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php if(isset($row[$val['id']]) && $row[$val['id']]): ?>
			<?php echo (isset($row[$val['id']]['name']) && ($row[$val['id']]['name'] !== '')?$row[$val['id']]['name']:''); endif; ?>
		</div>
	</div>
	<?php endif; ?>
	<!--关联商机-->
	<?php if($val['component'] == 'business'): ?>

	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php if(isset($row[$val['id']]) && $row[$val['id']]): ?>
			<?php echo (isset($row[$val['id']]['name']) && ($row[$val['id']]['name'] !== '')?$row[$val['id']]['name']:''); endif; ?>
		</div>
	</div>
	<?php endif; ?>
	<!--关联员工-->
	<?php if($val['component'] == 'staff'): ?>

	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php if(isset($row[$val['id']]) && $row[$val['id']]): ?>
			<?php echo (isset($row[$val['id']]['name']) && ($row[$val['id']]['name'] !== '')?$row[$val['id']]['name']:''); endif; ?>
		</div>
	</div>
	<?php endif; ?>
	<!--关联部门-->
	<?php if($val['component'] == 'department'): ?>

	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php if(isset($row[$val['id']]) && $row[$val['id']]): ?>
			<?php echo (isset($row[$val['id']]['name']) && ($row[$val['id']]['name'] !== '')?$row[$val['id']]['name']:''); endif; ?>
		</div>
	</div>
	<?php endif; ?>
	<!--标签-->
	<?php if($val['component'] == 'label'): ?>

	<div class="col-xs-12 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted"><?php echo $val['config']['label']; ?>:</span>
			<?php if(isset($row[$val['id']]) && $row[$val['id']]): $label_info=explode(',',$row[$val['id']]); if(is_array($label_info) || $label_info instanceof \think\Collection || $label_info instanceof \think\Paginator): if( count($label_info)==0 ) : echo "" ;else: foreach($label_info as $key=>$tem): $label_color=explode('^',$tem); if(isset($label_color[1])): ?>
				<div class="label" style="margin-left:5px;background: rgba(0, 82, 204, 0.1);color: <?php echo $label_color['1']; ?>"><?php echo $label_color['0']; ?></div>
				<?php endif; endforeach; endif; else: echo "" ;endif; endif; ?>
		</div>
	</div>
	<?php endif; endif; endforeach; endif; else: echo "" ;endif; ?>
				</div>
			</div>
			<div role="tabpanel" class="tab-pane fade panel-body" id="contacts">


				<div id="toolbar_contacts" class="toolbar">
					<?php echo build_toolbar('refresh'); if($row['operation'] == 'update'): ?>
					<a class="btn btn-success btn-dialog <?php echo $auth->check('qingdongams/customer/contacts/add')?'':'hide'; ?>"
					   data-url="qingdongams/customer/contacts/add?customer_id=<?php echo $row['id']; ?>" data-title="新建联系人"  data-refresh="true" data-area=["90%","90%"]>新建联系人</a>
					<?php endif; ?>
				</div>
				<table id="table-contacts" class="table table-striped table-bordered table-hover table-nowrap"
					   width="100%">
				</table>
			</div>
			<div role="tabpanel" class="tab-pane fade panel-body" id="settings7">

				<div id="toolbar_business" class="toolbar">
					<?php echo build_toolbar('refresh'); if($row['operation'] == 'update'): ?>
					<a class="btn btn-success btn-dialog"
					   data-url="qingdongams/customer/business/add?customer_id=<?php echo $row['id']; ?>" data-title="新建商机" data-refresh="true" data-area=["90%","90%"]>新建商机</a>
					<?php endif; ?>
				</div>
				<table id="business" class="table table-striped table-bordered table-hover table-nowrap"
					   width="100%">
				</table>
			</div>
			<div role="tabpanel" class="tab-pane fade panel-body" id="settings1">

				<div id="toolbar_contract" class="toolbar">
					<?php echo build_toolbar('refresh'); if($row['operation'] == 'update'): ?>
					<a class="btn btn-success btn-dialog <?php echo $auth->check('qingdongams/customer/contract/add')?'':'hide'; ?>"
					   data-url="qingdongams/customer/contract/add?customer_id=<?php echo $row['id']; ?>" data-title="新建合同" data-refresh="true" data-area=["90%","90%"] >新建合同</a>
					<?php endif; ?>
				</div>
				<table id="contract" class="table table-striped table-bordered table-hover table-nowrap"
					   width="100%">
				</table>
			</div>
			<div role="tabpanel" class="tab-pane fade panel-body" id="settings5">

				<div id="toolbar_consume" class="toolbar">
					<?php echo build_toolbar('refresh'); if($row['operation'] == 'update'): ?>
					<a class="btn btn-success btn-dialog <?php echo $auth->check('qingdongams/customer/consume/add')?'':'hide'; ?>"
					   data-url="qingdongams/customer/consume/add?customer_id=<?php echo $row['id']; ?>" data-title="新建费用" data-refresh="true" data-area=["90%","90%"]>新建费用</a>
					<?php endif; ?>
				</div>
				<table id="consume" class="table table-striped table-bordered table-hover table-nowrap"
					   width="100%">
				</table>
			</div>
			<div role="tabpanel" class="tab-pane fade panel-body" id="settings2">
				<div class="panel panel-warning">
					<div class="panel-heading">回款计划</div>
					<div class="panel-body">

						<div id="toolbar_receivablesplan" class="toolbar">
							<?php echo build_toolbar('refresh'); if($row['operation'] == 'update'): ?>
							<a class="btn btn-success btn-dialog <?php echo $auth->check('qingdongams/customer/receivablesplan/add')?'':'hide'; ?>"
							   data-url="qingdongams/customer/receivablesplan/add?customer_id=<?php echo $row['id']; ?>" data-title="新建回款计划" data-refresh="true"  >新建回款计划</a>
							<?php endif; ?>
						</div>
						<table id="plan" class="table table-striped table-bordered table-hover table-nowrap"
							   width="100%">
						</table>
					</div>
				</div>

				<div class="panel panel-info">
					<div class="panel-heading">回款记录</div>
					<div class="panel-body">
						<div id="toolbar_receivables" class="toolbar">
							<?php echo build_toolbar('refresh'); if($row['operation'] == 'update'): ?>
							<a class="btn btn-success btn-dialog <?php echo $auth->check('qingdongams/customer/receivables/add')?'':'hide'; ?>"  data-refresh="true" data-url="qingdongams/customer/receivables/add?customer_id=<?php echo $row['id']; ?>" data-area=["90%","90%"] data-title="新建回款">新建回款</a>
							<?php endif; ?>
						</div>

						<table id="receivables" class="table table-striped table-bordered table-hover table-nowrap"
							   width="100%">
						</table>
					</div>
				</div>

			</div>
			<div role="tabpanel" class="tab-pane fade panel-body" id="settings3">
				<div id="toolbar_files" class="toolbar">
					<?php echo build_toolbar('refresh'); ?>
				</div>
				<table id="files" class="table table-striped table-bordered table-hover table-nowrap"
					   width="100%">
				</table>
			</div>
			<div role="tabpanel" class="tab-pane fade panel-body" id="team">
				<?php if($row['operation_team'] == 'read' && $row['operation'] == 'update'): ?>
				<div id="toolbar_team" class="toolbar">
					<?php echo build_toolbar('refresh'); ?>
					<a class="btn btn-info btn-dialog <?php echo $auth->check('qingdongams/customer/customer/addteam')?'':'hide'; ?>"
					   data-url="qingdongams/customer/customer/addteam?ids=<?php echo $row['id']; ?>" data-title="添加团队成员" data-refresh="true" data-area='["500px","300px"]'  >添加团队成员</a>
				</div>
				<table id="table_team" class="table table-striped table-bordered table-hover table-nowrap"
					   width="100%">
				</table>
				<?php endif; ?>
			</div>
			<div role="tabpanel" class="tab-pane fade panel-body" id="settings6">
				<div id="toolbar_sign" class="toolbar">
					<?php echo build_toolbar('refresh'); ?>
				</div>
				<table id="sign" class="table table-striped table-bordered table-hover table-nowrap"
					   width="100%">
				</table>
			</div>
			<div role="tabpanel" class="tab-pane fade panel-body" id="settings4">
				<div id="toolbar_log" class="toolbar">
					<?php echo build_toolbar('refresh'); ?>
				</div>
				<table id="operation_log" class="table table-striped table-bordered table-hover table-nowrap"
					   width="100%">
				</table>
			</div>
			<div role="tabpanel" class="tab-pane fade panel-body" id="quote">
				<div id="toolbar_quote" class="toolbar">
					<?php echo build_toolbar('refresh'); if($row['operation'] == 'update'): ?>
					<a class="btn btn-success btn-dialog" data-url="qingdongams/customer/quote/add?customer_id=<?php echo $row['id']; ?>" data-title="新建报价单"  data-refresh="true" data-area=["90%","90%"]>新建报价单</a>
					<?php endif; ?>
				</div>
				<table id="table-quote" class="table table-striped table-bordered table-hover table-nowrap"
					   width="100%">
				</table>
			</div>

			<div role="tabpanel" class="tab-pane fade panel-body" id="product">
				<div id="toolbar_product" class="toolbar">
					<?php echo build_toolbar('refresh'); ?>

				</div>
				<table id="table-product" class="table table-striped table-bordered table-hover table-nowrap"
					   width="100%">
				</table>
			</div>
			<div role="tabpanel" class="tab-pane fade panel-body" id="workorder">
				<div id="toolbar_workorder" class="toolbar">
					<?php echo build_toolbar('refresh'); if($row['operation'] == 'update'): ?>
					<div class="dropdown btn-group">
						<a class="btn btn-success btn-more dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> 新建工单</a>
						<ul class="dropdown-menu text-left" role="menu">
							<li><a class="btn btn-link btn-dialog" data-url="qingdongams/workorder/workorder/add?workorder_type=设计工单" data-area=["80%","80%"] data-title="设计工单" >设计工单</a></li>
							<li><a class="btn btn-link btn-dialog" data-url="qingdongams/workorder/workorder/add?workorder_type=生产工单" data-area=["80%","80%"] data-title="生产工单" >生产工单</a></li>
							<li><a class="btn btn-link btn-dialog" data-url="qingdongams/workorder/workorder/add?workorder_type=产品发货" data-area=["80%","80%"] data-title="产品发货" >产品发货</a></li>
							<li><a class="btn btn-link btn-dialog" data-url="qingdongams/workorder/workorder/add?workorder_type=上门安装" data-area=["80%","80%"] data-title="上门安装" >上门安装</a></li>
							<li><a class="btn btn-link btn-dialog" data-url="qingdongams/workorder/workorder/add?workorder_type=上门维修" data-area=["80%","80%"] data-title="上门维修" >上门维修</a></li>
							<li><a class="btn btn-link btn-dialog" data-url="qingdongams/workorder/workorder/add?workorder_type=返厂维修" data-area=["80%","80%"] data-title="返厂维修" >返厂维修</a></li>
							<li><a class="btn btn-link btn-dialog" data-url="qingdongams/workorder/workorder/add?workorder_type=品质异常单" data-area=["80%","80%"] data-title="品质异常单" >品质异常单</a></li>
							<li><a class="btn btn-link btn-dialog" data-url="qingdongams/workorder/workorder/add?workorder_type=电话售后" data-area=["80%","80%"] data-title="电话售后" >电话售后</a></li>
						</ul>
					</div>
					<?php endif; ?>
				</div>
				<table id="table-workorder" class="table table-striped table-bordered table-hover table-nowrap"
					   width="100%">
				</table>
			</div>
		</div>

	</div>
</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script src="/assets/js/require.min.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version'] ?? ''); ?>"></script>

    </body>
</html>
